package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysMemberRai;
import com.ruoyi.system.mapper.SysMemberRaiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysExpressMapper;
import com.ruoyi.system.domain.SysExpress;
import com.ruoyi.system.service.ISysExpressService;

/**
 * 订单快递关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-25
 */
@Service
public class SysExpressServiceImpl implements ISysExpressService 
{
    @Autowired
    private SysExpressMapper sysExpressMapper;
    @Autowired
    private SysMemberRaiMapper sysMemberRaiMapper;

    /**
     * 查询订单快递关联
     * 
     * @param id 订单快递关联主键
     * @return 订单快递关联
     */
    @Override
    public SysExpress selectSysExpressById(String id)
    {
        return sysExpressMapper.selectSysExpressById(id);
    }

    /**
     * 查询订单快递关联列表
     * 
     * @param sysExpress 订单快递关联
     * @return 订单快递关联
     */
    @Override
    public List<SysExpress> selectSysExpressList(SysExpress sysExpress)
    {
        return sysExpressMapper.selectSysExpressList(sysExpress);
    }

    /**
     * 新增订单快递关联
     * 
     * @param sysExpress 订单快递关联
     * @return 结果
     */
    @Override
    public int insertSysExpress(SysExpress sysExpress)
    {
        // 创建时间
        sysExpress.setCreateTime(DateUtils.getNowDate());
        return sysExpressMapper.insertSysExpress(sysExpress);
    }

    /**
     * 修改订单快递关联
     * 
     * @param sysExpress 订单快递关联
     * @return 结果
     */
    @Override
    public int updateSysExpress(SysExpress sysExpress)
    {
        sysExpress.setUpdateTime(DateUtils.getNowDate());
        return sysExpressMapper.updateSysExpress(sysExpress);
    }

    /**
     * 批量删除订单快递关联
     * 
     * @param ids 需要删除的订单快递关联主键
     * @return 结果
     */
    @Override
    public int deleteSysExpressByIds(String[] ids)
    {
        return sysExpressMapper.deleteSysExpressByIds(ids);
    }

    /**
     * 删除订单快递关联信息
     * 
     * @param id 订单快递关联主键
     * @return 结果
     */
    @Override
    public int deleteSysExpressById(String id)
    {
        return sysExpressMapper.deleteSysExpressById(id);
    }
}
